{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "victorian-farming",
   "metadata": {},
   "source": [
    "# Model Artifact Memory Consumption Tests"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ordered-freedom",
   "metadata": {},
   "outputs": [],
   "source": [
    "SCHEDULER_IP=!kubectl get svc seldon-scheduler -n seldon-mesh -o jsonpath='{.status.loadBalancer.ingress[0].ip}'\n",
    "SCHEDULER_IP=SCHEDULER_IP[0]\n",
    "import os\n",
    "os.environ['SCHEDULER_IP'] = SCHEDULER_IP"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "turkish-collection",
   "metadata": {},
   "outputs": [],
   "source": [
    "MESH_IP=!kubectl get svc seldon-mesh -n seldon-mesh -o jsonpath='{.status.loadBalancer.ingress[0].ip}'\n",
    "MESH_IP=MESH_IP[0]\n",
    "import os\n",
    "os.environ['MESH_IP'] = MESH_IP"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "formed-great",
   "metadata": {},
   "source": [
    "## MLServer sklearn Iris"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "weighted-niger",
   "metadata": {},
   "outputs": [],
   "source": [
    "numModels = 5\n",
    "memory=!kubectl exec seldon-mlserver-0 -n seldon-mesh -c mlserver -- cat /sys/fs/cgroup/memory/memory.usage_in_bytes\n",
    "memoryInitial=int(memory[0])\n",
    "print(memoryInitial)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "maritime-karaoke",
   "metadata": {},
   "outputs": [],
   "source": [
    "for x in range(1,numModels+1):\n",
    "    %env MODEL_NUM=$x\n",
    "    !grpcurl -d '{\"model\":{ \\\n",
    "              \"meta\":{\"name\":\"iris'$MODEL_NUM'\"},\\\n",
    "              \"modelSpec\":{\"uri\":\"gs://seldon-models/mlserver/iris\",\\\n",
    "                           \"requirements\":[\"sklearn\"],\\\n",
    "                           \"memoryBytes\":1},\\\n",
    "              \"deploymentSpec\":{\"replicas\":1}}}' \\\n",
    "         -plaintext \\\n",
    "         -import-path ../../apis \\\n",
    "         -proto ../../apis/mlops/scheduler/scheduler.proto  ${SCHEDULER_IP}:9004 seldon.mlops.scheduler.Scheduler/LoadModel\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "sacred-twelve",
   "metadata": {},
   "outputs": [],
   "source": [
    "memory=!kubectl exec seldon-mlserver-0 -n seldon-mesh -c mlserver -- cat /sys/fs/cgroup/memory/memory.usage_in_bytes\n",
    "memoryAfterLoad=int(memory[0])\n",
    "print(memoryAfterLoad)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "blond-compatibility",
   "metadata": {},
   "outputs": [],
   "source": [
    "for round in range(2):\n",
    "    for x in range(1,numModels+1):\n",
    "        %env MODEL_NUM=$x\n",
    "        !curl -w \"\\n%{http_code}\\n\" http://${MESH_IP}/v2/models/iris$MODEL_NUM/infer -H \"Content-Type: application/json\" -H \"Host: iris\"$MODEL_NUM\\\n",
    "            -d '{\"inputs\": [{\"name\": \"predict\", \"shape\": [1, 4], \"datatype\": \"FP32\", \"data\": [[1, 2, 3, 4]]}]}'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "current-custom",
   "metadata": {},
   "outputs": [],
   "source": [
    "memory=!kubectl exec seldon-mlserver-0 -n seldon-mesh -c mlserver -- cat /sys/fs/cgroup/memory/memory.usage_in_bytes\n",
    "memoryAfterCurl=int(memory[0])\n",
    "print(memoryAfterCurl)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "confused-worthy",
   "metadata": {},
   "outputs": [],
   "source": [
    "for x in range(1,numModels+1):\n",
    "    %env MODEL_NUM=$x\n",
    "    !grpcurl -d '{\"model\":{\"name\":\"iris'$MODEL_NUM'\"}}' \\\n",
    "         -plaintext \\\n",
    "         -import-path ../../apis \\\n",
    "         -proto ../../apis/mlops/scheduler/scheduler.proto  ${SCHEDULER_IP}:9004 seldon.mlops.scheduler.Scheduler/UnloadModel\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "focal-coupon",
   "metadata": {},
   "outputs": [],
   "source": [
    "memory=!kubectl exec seldon-mlserver-0 -n seldon-mesh -c mlserver -- cat /sys/fs/cgroup/memory/memory.usage_in_bytes\n",
    "memoryAfterUnload=int(memory[0])\n",
    "print(memoryAfterUnload)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "specialized-reaction",
   "metadata": {},
   "outputs": [],
   "source": [
    "memoryPerModel = ((memoryAfterCurl - memoryAfterUnload)/numModels) \n",
    "print(memoryPerModel)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "aware-livestock",
   "metadata": {},
   "source": [
    "## MLServer Xgboost Agaricus"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "reliable-liberal",
   "metadata": {},
   "outputs": [],
   "source": [
    "numModels = 5\n",
    "memory=!kubectl exec seldon-mlserver-0 -n seldon-mesh -c mlserver -- cat /sys/fs/cgroup/memory/memory.usage_in_bytes\n",
    "memoryInitial=int(memory[0])\n",
    "print(memoryInitial)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "seventh-organ",
   "metadata": {},
   "outputs": [],
   "source": [
    "for x in range(1,numModels+1):\n",
    "    %env MODEL_NUM=$x\n",
    "    !grpcurl -d '{\"model\":{ \\\n",
    "              \"meta\":{\"name\":\"agaricus'$MODEL_NUM'\"},\\\n",
    "              \"modelSpec\":{\"uri\":\"gs://seldon-models/mlserver/mushroom\",\\\n",
    "                           \"requirements\":[\"sklearn\"],\\\n",
    "                           \"memoryBytes\":1},\\\n",
    "              \"deploymentSpec\":{\"replicas\":1}}}' \\\n",
    "         -plaintext \\\n",
    "         -import-path ../../apis \\\n",
    "         -proto ../../apis/mlops/scheduler/scheduler.proto  ${SCHEDULER_IP}:9004 seldon.mlops.scheduler.Scheduler/LoadModel\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "broken-register",
   "metadata": {},
   "outputs": [],
   "source": [
    "memory=!kubectl exec seldon-mlserver-0 -n seldon-mesh -c mlserver -- cat /sys/fs/cgroup/memory/memory.usage_in_bytes\n",
    "memoryAfterLoad=int(memory[0])\n",
    "print(memoryAfterLoad)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "joined-papua",
   "metadata": {},
   "outputs": [],
   "source": [
    "!grpcurl -d '{\"model\":{\"name\":\"agaricus5\"}}' \\\n",
    "         -plaintext \\\n",
    "         -import-path ../../apis \\\n",
    "         -proto ../../apis/mlops/scheduler/scheduler.proto  ${SCHEDULER_IP}:9004 seldon.mlops.scheduler.Scheduler/ModelStatus"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "small-effect",
   "metadata": {},
   "outputs": [],
   "source": [
    "for round in range(1):\n",
    "    for x in range(1,numModels+1):\n",
    "        print(\"\")\n",
    "        %env MODEL_NUM=$x\n",
    "        !curl -w \"\\n%{http_code}\\n\" http://${MESH_IP}/v2/models/agaricus$MODEL_NUM/infer -H \"Content-Type: application/json\" -H \"Host: agaricus\"$MODEL_NUM\\\n",
    "            -d '{\"inputs\": [{\"name\": \"predict\",\"shape\": [1, 126],\"datatype\": \"FP32\",\"data\":[1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0]}]}'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "important-dryer",
   "metadata": {},
   "outputs": [],
   "source": [
    "memory=!kubectl exec seldon-mlserver-0 -n seldon-mesh -c mlserver -- cat /sys/fs/cgroup/memory/memory.usage_in_bytes\n",
    "memoryAfterCurl=int(memory[0])\n",
    "print(memoryAfterCurl)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "circular-brush",
   "metadata": {},
   "outputs": [],
   "source": [
    "for x in range(1,numModels+1):\n",
    "    %env MODEL_NUM=$x\n",
    "    !grpcurl -d '{\"model\":{\"name\":\"agaricus'$MODEL_NUM'\"}}' \\\n",
    "         -plaintext \\\n",
    "         -import-path ../../apis \\\n",
    "         -proto ../../apis/mlops/scheduler/scheduler.proto  ${SCHEDULER_IP}:9004 seldon.mlops.scheduler.Scheduler/UnloadModel\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "played-capability",
   "metadata": {},
   "outputs": [],
   "source": [
    "memory=!kubectl exec seldon-mlserver-0 -n seldon-mesh -c mlserver -- cat /sys/fs/cgroup/memory/memory.usage_in_bytes\n",
    "memoryAfterUnload=int(memory[0])\n",
    "print(memoryAfterUnload)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "environmental-integrity",
   "metadata": {},
   "outputs": [],
   "source": [
    "memoryPerModel = ((memoryAfterCurl - memoryAfterUnload)/numModels) \n",
    "print(memoryPerModel)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "better-watch",
   "metadata": {},
   "source": [
    "## MLServer Conclusion\n",
    "\n",
    " * Around 80M is used per Model - both models tested were smallish 1K (disk size) models."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "dimensional-actress",
   "metadata": {},
   "source": [
    "## Triton Simple Tensorflow Model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "burning-glass",
   "metadata": {},
   "outputs": [],
   "source": [
    "numModels = 20\n",
    "memory=!kubectl exec seldon-triton-0 -n seldon-mesh -c triton -- cat /sys/fs/cgroup/memory/memory.usage_in_bytes\n",
    "memoryInitial=int(memory[0])\n",
    "print(memoryInitial)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "committed-motel",
   "metadata": {},
   "outputs": [],
   "source": [
    "for x in range(1,numModels+1):\n",
    "    %env MODEL_NUM=$x\n",
    "    !grpcurl -d '{\"model\":{ \\\n",
    "              \"meta\":{\"name\":\"simple'$MODEL_NUM'\"},\\\n",
    "              \"modelSpec\":{\"uri\":\"gs://seldon-models/triton/simple\",\\\n",
    "                           \"requirements\":[\"tensorflow\"],\\\n",
    "                           \"memoryBytes\":1},\\\n",
    "              \"deploymentSpec\":{\"replicas\":1}}}' \\\n",
    "         -plaintext \\\n",
    "         -import-path ../../apis \\\n",
    "         -proto ../../apis/mlops/scheduler/scheduler.proto  ${SCHEDULER_IP}:9004 seldon.mlops.scheduler.Scheduler/LoadModel\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "relevant-notification",
   "metadata": {},
   "outputs": [],
   "source": [
    "for x in range(1,numModels+1):\n",
    "        %env MODEL_NUM=$x\n",
    "        !grpcurl -d '{\"model\":{\"name\":\"simple'$MODEL_NUM'\"}}' \\\n",
    "             -plaintext \\\n",
    "             -import-path ../../apis \\\n",
    "             -proto ../../apis/mlops/scheduler/scheduler.proto  ${SCHEDULER_IP}:9004 seldon.mlops.scheduler.Scheduler/ModelStatus\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "willing-battery",
   "metadata": {},
   "outputs": [],
   "source": [
    "memory=!kubectl exec seldon-mlserver-0 -n seldon-mesh -c mlserver -- cat /sys/fs/cgroup/memory/memory.usage_in_bytes\n",
    "memoryAfterLoad=int(memory[0])\n",
    "print(memoryAfterLoad)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "capital-skiing",
   "metadata": {},
   "outputs": [],
   "source": [
    "for round in range(1):\n",
    "    for x in range(1,numModels+1):\n",
    "        %env MODEL_NUM=$x\n",
    "        !curl -w \"\\n%{http_code}\\n\" http://${MESH_IP}/v2/models/simple$MODEL_NUM/infer -H \"Content-Type: application/json\" -H \"Host: simple\"$MODEL_NUM\\\n",
    "            -d '{\"inputs\":[{\"name\":\"INPUT0\",\"data\":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],\"datatype\":\"INT32\",\"shape\":[1,16]},{\"name\":\"INPUT1\",\"data\":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],\"datatype\":\"INT32\",\"shape\":[1,16]}]}'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fifteen-planet",
   "metadata": {},
   "outputs": [],
   "source": [
    "memory=!kubectl exec seldon-mlserver-0 -n seldon-mesh -c mlserver -- cat /sys/fs/cgroup/memory/memory.usage_in_bytes\n",
    "memoryAfterCurl=int(memory[0])\n",
    "print(memoryAfterCurl)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "married-customer",
   "metadata": {},
   "outputs": [],
   "source": [
    "for x in range(1,numModels+1):\n",
    "    %env MODEL_NUM=$x\n",
    "    !grpcurl -d '{\"model\":{\"name\":\"simple'$MODEL_NUM'\"}}' \\\n",
    "         -plaintext \\\n",
    "         -import-path ../../apis \\\n",
    "         -proto ../../apis/mlops/scheduler/scheduler.proto  ${SCHEDULER_IP}:9004 seldon.mlops.scheduler.Scheduler/UnloadModel\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "progressive-tract",
   "metadata": {},
   "outputs": [],
   "source": [
    "memory=!kubectl exec seldon-mlserver-0 -n seldon-mesh -c mlserver -- cat /sys/fs/cgroup/memory/memory.usage_in_bytes\n",
    "memoryAfterUnload=int(memory[0])\n",
    "print(memoryAfterUnload)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "leading-ending",
   "metadata": {},
   "outputs": [],
   "source": [
    "memoryPerModel = ((memoryAfterCurl - memoryAfterUnload)/numModels) \n",
    "print(memoryPerModel)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "young-synthesis",
   "metadata": {},
   "source": [
    "## Triton XGBoost Agaricus Model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "helpful-sister",
   "metadata": {},
   "outputs": [],
   "source": [
    "numModels = 20\n",
    "memory=!kubectl exec seldon-triton-0 -n seldon-mesh -c triton -- cat /sys/fs/cgroup/memory/memory.usage_in_bytes\n",
    "memoryInitial=int(memory[0])\n",
    "print(memoryInitial)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "labeled-belfast",
   "metadata": {},
   "outputs": [],
   "source": [
    "for x in range(1,numModels+1):\n",
    "    %env MODEL_NUM=$x\n",
    "    !grpcurl -d '{\"model\":{ \\\n",
    "              \"meta\":{\"name\":\"triton-agaricus'$MODEL_NUM'\"},\\\n",
    "              \"modelSpec\":{\"uri\":\"gs://seldon-models/triton/agaricus\",\\\n",
    "                           \"requirements\":[\"tensorflow\"],\\\n",
    "                           \"memoryBytes\":1},\\\n",
    "              \"deploymentSpec\":{\"replicas\":1}}}' \\\n",
    "         -plaintext \\\n",
    "         -import-path ../../apis \\\n",
    "         -proto ../../apis/mlops/scheduler/scheduler.proto  ${SCHEDULER_IP}:9004 seldon.mlops.scheduler.Scheduler/LoadModel\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "negative-southeast",
   "metadata": {},
   "outputs": [],
   "source": [
    "for x in range(1,numModels+1):\n",
    "        %env MODEL_NUM=$x\n",
    "        !grpcurl -d '{\"model\":{\"name\":\"triton-agaricus'$MODEL_NUM'\"}}' \\\n",
    "             -plaintext \\\n",
    "             -import-path ../../apis \\\n",
    "             -proto ../../apis/mlops/scheduler/scheduler.proto  ${SCHEDULER_IP}:9004 seldon.mlops.scheduler.Scheduler/ModelStatus\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bearing-juvenile",
   "metadata": {},
   "outputs": [],
   "source": [
    "memory=!kubectl exec seldon-mlserver-0 -n seldon-mesh -c mlserver -- cat /sys/fs/cgroup/memory/memory.usage_in_bytes\n",
    "memoryAfterLoad=int(memory[0])\n",
    "print(memoryAfterLoad)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "weekly-front",
   "metadata": {},
   "outputs": [],
   "source": [
    "for round in range(1):\n",
    "    for x in range(1,numModels+1):\n",
    "        %env MODEL_NUM=$x\n",
    "        !curl -w \"\\n%{http_code}\\n\" http://${MESH_IP}/v2/models/triton-agaricus$MODEL_NUM/infer -H \"Content-Type: application/json\" -H \"Host: triton-agaricus\"$MODEL_NUM\\\n",
    "            -d '{\"inputs\": [{\"name\": \"input__0\",\"shape\": [1, 126],\"datatype\": \"FP32\",\"data\":[1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0]}]}'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "joined-edward",
   "metadata": {},
   "outputs": [],
   "source": [
    "memory=!kubectl exec seldon-mlserver-0 -n seldon-mesh -c mlserver -- cat /sys/fs/cgroup/memory/memory.usage_in_bytes\n",
    "memoryAfterCurl=int(memory[0])\n",
    "print(memoryAfterCurl)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "considered-journalist",
   "metadata": {},
   "outputs": [],
   "source": [
    "for x in range(1,numModels+1):\n",
    "    %env MODEL_NUM=$x\n",
    "    !grpcurl -d '{\"model\":{\"name\":\"triton-agaricus'$MODEL_NUM'\"}}' \\\n",
    "         -plaintext \\\n",
    "         -import-path ../../apis \\\n",
    "         -proto ../../apis/mlops/scheduler/scheduler.proto  ${SCHEDULER_IP}:9004 seldon.mlops.scheduler.Scheduler/UnloadModel\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "invisible-ottawa",
   "metadata": {},
   "outputs": [],
   "source": [
    "memory=!kubectl exec seldon-mlserver-0 -n seldon-mesh -c mlserver -- cat /sys/fs/cgroup/memory/memory.usage_in_bytes\n",
    "memoryAfterUnload=int(memory[0])\n",
    "print(memoryAfterUnload)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "auburn-horizontal",
   "metadata": {},
   "outputs": [],
   "source": [
    "memoryPerModel = ((memoryAfterCurl - memoryAfterUnload)/numModels) \n",
    "print(memoryPerModel)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "electrical-sigma",
   "metadata": {},
   "source": [
    "## Triton Conclusions\n",
    "\n",
    " * Triton models take up variable small amount 0-10K for a small model of around 300 bytes on disk\n",
    "   * Sometimes the memory used is negative by above calulation\n",
    "   * Maybe due to delayed memory garbage collection?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "infectious-airfare",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
